from tkinter import*
x0=int(input("координата x0"))
y0=int(input("координата y0"))
n=int(input("коэфициент"))
if n==0 and x0>=0 and y0>=0 and x0<=500 and y0<=500:
       pass
else:
    if n>0 and x0>=0 and y0>=0 and x0+10*n<=500 and y0+10*n<=500:
        pass
    else:
        print("размер фигуры превышает максимальный")
        exit()
root=Tk()
root.geometry("500x500")
canvas=Canvas(bg="white",width=500,height=500)
canvas.pack(anchor=CENTER,expand=1)
canvas.create_polygon(x0,y0,x0+0*n,y0+30*n,x0+10*n,y0+30*n,x0+10*n,y0+20*n,x0+20*n,y0+20*n,x0+20*n,y0+10*n,x0+10*n,y0+10*n,x0+10*n,y0+0*n,x0+0*n,y0+0*n)
root.mainloop()
